package com.pengtu.gsj.entity.yh;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pengtu.gsj.entity.app.Organization;
import com.pengtu.gsj.entity.base.IdEntity;

/**
 * 
 * 
 * RoadRepair
 * 
 * 2017年6月6日 上午11:58:08
 * @author lei
 * @version 1.0.0
 *
 */
@Entity
@Table(name = "T_REP_ROADREPAIR")
public class RoadRepair extends IdEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	private String rrId;//小修系统过来的小修项目id 用于展示验收表
	private String projectName;//项目名称
	private String projectNumber;//项目编号
	private String emergency;//是否抢险工程
	private String roadName;//道路名称
	private String projectLocation;//项目起至     
	private String projectPoint;//项目概括
	private String projectService;//维修措施
	private String manageOrg;//区局单位
	private String maintainOrg;//养护单位
	private String supervisionOrg;//监理单位
	private String district;//区
	private String subdistrict;//街道
	private String maintainSource;//资金来源
	private String surveyer;//项目调查人
	private String principal;//项目负责人
	private Double projectApplyCost;//项目申请金额
	private Double projectCost;//项目总金额
	private Date beginDate;//开始时间
	private Date endDate;//结束时间
	private String status;//工程状态
	private Double lon;//经度
	private Double lat;//纬度
	private String remark;
	private String cid;//合同id 用于查询用户标段
	private String damageKind;//设施类型
	private String diseaseDescribe;//病害描述
	private Date foundTime;//病害发现时间
	private String maintainOrgId;
	private Organization mainOrganization;
	
	@Column(name="PROJECTNAME")
	public String getProjectName() {
		return projectName;
	}
	@Column(name = "PROJECTNUMBER")
	public String getProjectNumber() {
		return projectNumber;
	}
	@Column(name = "CID")
	public String getCid() {
		return cid;
	}
	@Column(name = "EMERGENCY")
	public String getEmergency() {
		return emergency;
	}
	@Column(name = "ROADNAME")
	public String getRoadName() {
		return roadName;
	}
	@Column(name = "PROJECTLOCATION")
	public String getProjectLocation() {
		return projectLocation;
	}
	@Column(name = "PROJECTPOINT")
	public String getProjectPoint() {
		return projectPoint;
	}
	@Column(name = "PROJECTSERVICE")
	public String getProjectService() {
		return projectService;
	}
	@Column(name = "MANAGEORG")
	public String getManageOrg() {
		return manageOrg;
	}
	@Column(name = "MAINTAINORG")
	public String getMaintainOrg() {
		return maintainOrg;
	}
	@Column(name = "SUPERVISIONORG")
	public String getSupervisionOrg() {
		return supervisionOrg;
	}
	@Column(name = "DISTRICT")
	public String getDistrict() {
		return district;
	}
	@Column(name = "SUBDISTRICT")
	public String getSubdistrict() {
		return subdistrict;
	}
	@Column(name = "MAINTAINSOURCE")
	public String getMaintainSource() {
		return maintainSource;
	}
	@Column(name = "SURVEYER")
	public String getSurveyer() {
		return surveyer;
	}
	@Column(name = "PRINCIPAL")
	public String getPrincipal() {
		return principal;
	}
	@Column(name = "PROJECTAPPLYCOST")
	public Double getProjectApplyCost() {
		return projectApplyCost;
	}
	@Column(name = "PROJECTCOST")
	public Double getProjectCost() {
		return projectCost;
	}
	@Column(name = "BEGINDATE")
	public Date getBeginDate() {
		return beginDate;
	}
	@Column(name = "ENDDATE")
	public Date getEndDate() {
		return endDate;
	}
	@Column(name = "STATUS")
	public String getStatus() {
		return status;
	}
	@Column(name = "LON")
	public Double getLon() {
		return lon;
	}
	@Column(name = "LAT")
	public Double getLat() {
		return lat;
	}
	@Column(name = "REMARK")
	public String getRemark() {
		return remark;
	}
	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}
	public void setProjectNumber(String projectNumber) {
		this.projectNumber = projectNumber;
	}
	public void setCid(String cid) {
		this.cid = cid;
	}
	public void setEmergency(String emergency) {
		this.emergency = emergency;
	}
	public void setRoadName(String roadName) {
		this.roadName = roadName;
	}
	public void setProjectLocation(String projectLocation) {
		this.projectLocation = projectLocation;
	}
	public void setProjectPoint(String projectPoint) {
		this.projectPoint = projectPoint;
	}
	public void setProjectService(String projectService) {
		this.projectService = projectService;
	}
	public void setManageOrg(String manageOrg) {
		this.manageOrg = manageOrg;
	}
	public void setMaintainOrg(String maintainOrg) {
		this.maintainOrg = maintainOrg;
	}
	public void setSupervisionOrg(String supervisionOrg) {
		this.supervisionOrg = supervisionOrg;
	}
	public void setDistrict(String district) {
		this.district = district;
	}
	public void setSubdistrict(String subdistrict) {
		this.subdistrict = subdistrict;
	}
	public void setMaintainSource(String maintainSource) {
		this.maintainSource = maintainSource;
	}
	public void setSurveyer(String surveyer) {
		this.surveyer = surveyer;
	}
	public void setPrincipal(String principal) {
		this.principal = principal;
	}
	public void setProjectApplyCost(Double projectApplyCost) {
		this.projectApplyCost = projectApplyCost;
	}
	public void setProjectCost(Double projectCost) {
		this.projectCost = projectCost;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public void setLon(Double lon) {
		this.lon = lon;
	}
	public void setLat(Double lat) {
		this.lat = lat;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name="DAMAGEKIND")
	public String getDamageKind() {
		return damageKind;
	}
	public void setDamageKind(String damageKind) {
		this.damageKind = damageKind;
	}
	@Column(name="RRID")
	public String getRrId() {
		return rrId;
	}
	public void setRrId(String rrId) {
		this.rrId = rrId;
	}
	@Column(name="DISEASEDESCRIBE")
	public String getDiseaseDescribe() {
		return diseaseDescribe;
	}
	public void setDiseaseDescribe(String diseaseDescribe) {
		this.diseaseDescribe = diseaseDescribe;
	}
	@Column(name="FOUNDTIME")
	public Date getFoundTime() {
		return foundTime;
	}
	public void setFoundTime(Date foundTime) {
		this.foundTime = foundTime;
	}
	
	@Transient
	@JsonIgnore
	public String getMaintainOrgId() {
		return maintainOrgId;
	}
	public void setMaintainOrgId(String maintainOrgId) {
		this.maintainOrgId = maintainOrgId;
	}
	
	@ManyToOne(cascade = { CascadeType.PERSIST }, fetch = FetchType.LAZY)
	@JoinColumn(name = "ORGID")
	@Cache(usage=CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
	@JsonIgnore 
	public Organization getMainOrganization() {
		return mainOrganization;
	}

	public void setMainOrganization(Organization mainOrganization) {
		this.mainOrganization = mainOrganization;
	}
	
	@Override
	public String toString() {
		return "RoadRepair [rrId=" + rrId + ",projectName=" + projectName + ", projectNumber="
				+ projectNumber + ", emergency=" + emergency
				+ ", roadName=" + roadName + ", projectLocation="
				+ projectLocation + ", projectPoint=" + projectPoint
				+ ", projectService=" + projectService + ", manageOrg="
				+ manageOrg + ", maintainOrg=" + maintainOrg
				+ ", supervisionOrg=" + supervisionOrg + ", district="
				+ district + ", subdistrict=" + subdistrict
				+ ", maintainSource=" + maintainSource + ", surveyer="
				+ surveyer + ", principal=" + principal + ", projectApplyCost="
				+ projectApplyCost + ", projectCost=" + projectCost
				+ ", beginDate=" + beginDate + ", endDate=" + endDate
				+ ", status=" + status + ", lon=" + lon + ", lat=" + lat
				+ ", remark=" + remark + ", cid=" + cid + "]";
	}
	
}
